/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tk.eigh.ksvg.component.painting;

import ksvg.core.SVGComponentBase;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
import tk.eigh.ksvg.component.common._ViewBoxAware;
import tk.eigh.ksvg.types.SVGCoordinate;
import tk.eigh.ksvg.types.SVGLength;

/**
 *
 * @author nt
 */
@JSFComponent(name = "svg:Marker",
type = "tk.eigh.svg.Marker",
family = "painting.Marker",
clazz = "ksvg.painting.Marker",
tagClass = "ksvg.tags.painting.MarkerTag",
defaultRendererType = "painting.SVGMarkerRenderer",
desc = "The ‘marker’ element defines the graphics that is to be used for drawing arrowheads or polymarkers on a given ‘path’, ‘line’, ‘polyline’ or ‘polygon’ element.")
public abstract class AbstractMarker extends SVGComponentBase implements _ViewBoxAware{

    /**
     * markerUnits = "strokeWidth | userSpaceOnUse"
     *<br/>
     * Defines the coordinate system for attributes ‘markerWidth’,
     * ‘markerHeight’ and the contents of the ‘marker’. If
     * markerUnits="strokeWidth", ‘markerWidth’, ‘markerHeight’ and the contents
     * of the ‘marker’ represent values in a coordinate system which has a
     * single unit equal the size in user units of the current stroke width (see
     * the ‘stroke-width’ property) in place for the graphic object referencing
     * the marker. If markerUnits="userSpaceOnUse", ‘markerWidth’,
     * ‘markerHeight’ and the contents of the ‘marker’ represent values in the
     * current user coordinate system in place for the graphic object
     * referencing the marker (i.e., the user coordinate system for the element
     * referencing the ‘marker’ element via a ‘marker’, ‘marker-start’,
     * ‘marker-mid’ or ‘marker-end’ property). If attribute ‘markerUnits’ is not
     * specified, then the effect is as if a value of 'strokeWidth' were
     * specified.
     *<br/>
     * Animatable: yes.
     */
    @JSFProperty
    public abstract String getMarkerUnits();

    /**
     * refX = "<coordinate>"
     *<br/>
     * The x-axis coordinate of the reference point which is to be aligned
     * exactly at the marker position. The coordinate is defined in the
     * coordinate system after application of the ‘viewBox’ and
     * ‘preserveAspectRatio’ attributes. If the attribute is not specified, the
     * effect is as if a value of "0" were specified.
     *<br/>
     * Animatable: yes.
     */
    @JSFProperty
    public abstract SVGCoordinate getRefX();

    /**
     * refY = "<coordinate>"
     *<br/>
     * The y-axis coordinate of the reference point which is to be aligned
     * exactly at the marker position. The coordinate is defined in the
     * coordinate system after application of the ‘viewBox’ and
     * ‘preserveAspectRatio’ attributes. If the attribute is not specified, the
     * effect is as if a value of "0" were specified.
     *<br/>
     * Animatable: yes.
     */
    @JSFProperty
    public abstract SVGCoordinate getRefY();

    /**
     * markerWidth = "<length>"
     *<br/>
     * Represents the width of the viewport into which the marker is to be
     * fitted when it is rendered. A negative value is an error (see Error
     * processing). A value of zero disables rendering of the element. If the
     * attribute is not specified, the effect is as if a value of "3" were
     * specified.
     *<br/>
     * Animatable: yes.
     */
    @JSFProperty
    public abstract SVGLength getMarkerWidth();

    /**
     * markerHeight = "<length>"
     *<br/>
     * Represents the height of the viewport into which the marker is to be
     * fitted when it is rendered. A negative value is an error (see Error
     * processing). A value of zero disables rendering of the element. If the
     * attribute is not specified, the effect is as if a value of "3" were
     * specified.
     *<br/>
     * Animatable: yes.
     */
    @JSFProperty
    public abstract SVGLength getMarkerHeight();

    /**
     * orient = "auto | <angle>" Indicates how the marker is rotated.
     *<br/>
     * A value of 'auto' indicates that the marker is oriented such that its
     * positive x-axis is pointing as follows: If there is a path segment coming
     * into the vertex and another path segment going out of the vertex, the
     * marker's positive x-axis should point toward the angle bisector for the
     * angle at the given vertex, where that angle has one side consisting of
     * tangent vector for the path segment going into the vertex and the other
     * side the tangent vector for the path segment going out of the vertex.
     * Note: If the tangent vectors are the same, the angle bisector equals the
     * two tangent vectors. If an incoming and an outgoing vertex produce a zero
     * vector the direction of marker is undefined. If there is only a path
     * segment going into the vertex (e.g., the last vertex on an open path),
     * the marker's positive x-axis should point in the same direction as the
     * tangent vector for the path segment going into the vertex. If there is
     * only a path segment going out of the vertex (e.g., the first vertex on an
     * open path), the marker's positive x-axis should point in the same
     * direction as the tangent vector for the path segment going out of the
     * vertex. (Refer to ‘path’ element implementation notes for a more thorough
     * discussion of the directionality of path segments.) * In all cases for
     * closed subpaths (e.g., subpaths which end with a 'closepath' command),
     * the orientation of the marker corresponding to the initial point of the
     * subpath is calculated assuming that: the path segment going into the
     * vertex is the path segment corresponding to the closepath the path
     * segment coming out of the vertex is the first path segment in the subpath
     *<br/>
     * When a 'closepath' command is followed by a command other than a 'moveto'
     * command, then the orientation of the marker corresponding to the
     * 'closepath' command is calculated assuming that: the path segment going
     * into the vertex is the path segment corresponding to the closepath the
     * path segment coming out of the vertex is the first path segment of the
     * subsequent subpath
     *<br/>
     * A <angle> value represents a particular orientation in the user space of
     * the graphic object referencing the marker. For example, if a value of "0"
     * is given, then the marker will be drawn such that its x-axis will align
     * with the x-axis of the user space of the graphic object referencing the
     * marker. If the attribute is not specified, the effect is as if a value of
     * "0" were specified.
     *<br/>
     * Animatable: yes (non-additive).
     */
    @JSFProperty
    public abstract String getOrient();
}